package cn.rulian.demo.hello.bo;

import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.springframework.format.annotation.DateTimeFormat;

import cn.rulian.base.common.bo.BaseBo;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 全面示例
 */
@Entity
@Table(name = "demo_hello_full")
public class Full extends BaseBo {

	@Column(length = 20)
	private String code; //编号（必填）
	
	@Column(length = 50)
	private String name; //名称（必填）
	
	@Column(length = 50)
	private String city; //城市（下拉框-url  枚举）
	
	@Column(length = 100)
	private String course; //课程（下拉框多选-url  枚举）
	
	@Column(length = 50)
	private String tea; //茶品（下拉框-固定序列）
	
	@Column(length = 100)
	private String hobby; //爱好（下拉框多选-固定序列）
	
	@Column(length = 200)
	private String remark; //备注（文本区域）
	
	private Integer intNum1; //整数1（必填，数字微调）
	
	private Integer intNum2; //整数2

	private Double doubleNum1; //实数1（必填）

	private Double doubleNum2; //实数2

	private Boolean boolean1; //布尔1

	private Boolean boolean2; //布尔2

	@JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8") //json格式化输出，列表显示时用
	@DateTimeFormat(pattern="yyyy-MM-dd") //Spring MVC格式转换：增加、修改时，向后台传送数据时用
	private Date theDate1; //日期1（日期微调框、必填）

	@JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8") //json格式化输出，列表显示时用
	@DateTimeFormat(pattern="yyyy-MM-dd") //Spring MVC格式转换：增加、修改时，向后台传送数据时用
	private Date theDate2; //日期2（选择框）

	@JsonFormat(pattern="yyyy-MM-dd HH:mm",timezone = "GMT+8") //json格式化输出，列表显示时用
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm") //Spring MVC格式转换：增加、修改时，向后台传送数据时用
	private Date theTime1; //时间1（时间微调框、必填）

	@JsonFormat(pattern="yyyy-MM-dd HH:mm",timezone = "GMT+8") //json格式化输出，列表显示时用
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm") //Spring MVC格式转换：增加、修改时，向后台传送数据时用
	private Date theTime2; //时间2（选择框）

	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") //json格式化输出，列表显示时用
	private Date addTime = new Date(); //增加时间
	
	@ManyToOne
	@JoinColumn(name = "fullsort_id")
	private FullSort fullSort; //分类

	@ManyToOne
	@JoinColumn(name = "mysort_id")
	private MySort mySort; //hello
	
	@OneToMany(mappedBy="full", fetch = FetchType.LAZY)
	private List<Address> addressList;

	public String getCode()
	{
		return code;
	}

	public void setCode(String code)
	{
		this.code = code;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getCity()
	{
		return city;
	}

	public void setCity(String city)
	{
		this.city = city;
	}

	public String getRemark()
	{
		return remark;
	}

	public void setRemark(String remark)
	{
		this.remark = remark;
	}

	public Integer getIntNum1()
	{
		return intNum1;
	}

	public void setIntNum1(Integer intNum1)
	{
		this.intNum1 = intNum1;
	}

	public Integer getIntNum2()
	{
		return intNum2;
	}

	public void setIntNum2(Integer intNum2)
	{
		this.intNum2 = intNum2;
	}

	public Double getDoubleNum1()
	{
		return doubleNum1;
	}

	public void setDoubleNum1(Double doubleNum1)
	{
		this.doubleNum1 = doubleNum1;
	}

	public Double getDoubleNum2()
	{
		return doubleNum2;
	}

	public void setDoubleNum2(Double doubleNum2)
	{
		this.doubleNum2 = doubleNum2;
	}

	public Boolean getBoolean1()
	{
		return boolean1;
	}

	public void setBoolean1(Boolean boolean1)
	{
		this.boolean1 = boolean1;
	}

	public Boolean getBoolean2()
	{
		return boolean2;
	}

	public void setBoolean2(Boolean boolean2)
	{
		this.boolean2 = boolean2;
	}

	public Date getTheDate1()
	{
		return theDate1;
	}

	public void setTheDate1(Date theDate1)
	{
		this.theDate1 = theDate1;
	}

	public Date getTheDate2()
	{
		return theDate2;
	}

	public void setTheDate2(Date theDate2)
	{
		this.theDate2 = theDate2;
	}

	public Date getTheTime1()
	{
		return theTime1;
	}

	public void setTheTime1(Date theTime1)
	{
		this.theTime1 = theTime1;
	}

	public Date getTheTime2()
	{
		return theTime2;
	}

	public void setTheTime2(Date theTime2)
	{
		this.theTime2 = theTime2;
	}

	public Date getAddTime()
	{
		return addTime;
	}

	public void setAddTime(Date addTime)
	{
		this.addTime = addTime;
	}

	public String getHobby()
	{
		return hobby;
	}

	public void setHobby(String hobby)
	{
		this.hobby = hobby;
	}

	public FullSort getFullSort()
	{
		return fullSort;
	}

	public void setFullSort(FullSort fullSort)
	{
		this.fullSort = fullSort;
	}

	public List<Address> getAddressList()
	{
		return addressList;
	}

	public void setAddressList(List<Address> addressList)
	{
		this.addressList = addressList;
	}

	public String getTea()
	{
		return tea;
	}

	public void setTea(String tea)
	{
		this.tea = tea;
	}

	public String getCourse()
	{
		return course;
	}

	public void setCourse(String course)
	{
		this.course = course;
	}

	public MySort getMySort()
	{
		return mySort;
	}

	public void setMySort(MySort mySort)
	{
		this.mySort = mySort;
	}
	
}
